﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.IEnumerable<GabageFactory.Models.Modification_apply>>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	数据修改申请列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>数据修改申请列表</h2>
    
    <p class="sys_create_btn">
        <%= Html.ActionLink("申请修改历史数据", "Create") %>
    </p>

    <table class="style_table2" cellspacing="0" cellpadding="0" border="0" style="margin-top:20px; width:756px;">
       <tr>
    	    <th style="width:140px;">申请日期</th>
    	    <th style="width:260px;">申请标题</th>
		    <th style="width:80px;">状态</th>
		    <th style="width:100px;">操作</th>
	    </tr>
        <%if (Model != null){ %>
        <% foreach (var item in Model) { %>
	    <tr>
	        <td style="text-align:center;"> <%= item.date %></td>
		    <td> <%= Html.ActionLink(item.title, "Detail", new { id = item.id })%></td>
            <td> <%= (item.status == 0 ? "等待审批" : (item.status == -1 ? "已拒绝" : (item.status == 1 ? "已批准" : (item.status == 2 ? "已处理" : "")))) %></td>
		    <td style="text-align:center;">
                <%if (item.status == 0){%>
                <label class="edit"><%= Html.ActionLink("编辑", "Edit", new { id = item.id })%></label>

                <label class="del"><%= Html.ActionLink("删除", "Delete", new { id = item.id }, new { onclick=@"return confirm('确定删除申请" + item.title + @"吗？');"})%></label>
                <%} %>
		&nbsp;
            </td>
        </tr>
        <%} %>
        <%} %>
    </table>
    <%
        using (Html.BeginForm("OwnedIndex", "Modification", FormMethod.Get))
        {
    %>
    <%=Html.Hidden("PageNo", (int)ViewData["currentPage"])%>
    <%
        }
    %>
    <% Html.RenderPartial("Pagination", ViewData); %>
    <script language="javascript" type="text/javascript">
        jQuery(function ($) {
            refreshMenuPage();
        });
    </script>
</asp:Content>
